﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PookSistener.SystemConfig
{
    public partial class frmSystemConfigMainMenu : Form
    {
        public frmSystemConfigMainMenu()
        {
            InitializeComponent();
        }

        private void SystemConfigMainMenu_Resize(object sender, EventArgs e)
        {
            int PADDING = 12;

            int width = this.Width;
            int widthForCal = width - (PADDING * 3); // 12 for Padding (left, center, right)

            int widthForEach = (int)(widthForCal / 2);

            btnSubCategory.Left = PADDING;
            btnSubCategory.Width = widthForEach;
            btnMainCategory.Left = btnSubCategory.Right;
            btnMainCategory.Width = widthForEach;

            button1.Left = btnSubCategory.Left;
            button1.Width = btnSubCategory.Width;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnSubCategory_Click(object sender, EventArgs e)
        {
            frmSubCategory form = new frmSubCategory();
            form.ShowDialog();
        }

        private void btnMainCategory_Click(object sender, EventArgs e)
        {
            MainCategory form = new MainCategory();
            form.ShowDialog();
        }
    }
}
